package com.zhs.gccs.mapbox;

import com.alibaba.fastjson.JSONArray;
import com.mapbox.maps.extension.style.expressions.generated.Expression;

import java.util.List;

public class ExpressionUtils {
    public static Expression  getInArrayExpression(String filed, List<String> values){
        JSONArray exp = new JSONArray();
        exp.add("in");
        exp.add(filed);
        for (String tag : values) {
            exp.add(tag);
        }
        Expression expression = Expression.fromRaw(exp.toJSONString());
        return expression;
    }
    public static Expression  getNotInArrayExpression(String filed, List<String> values){
        JSONArray exp = new JSONArray();
        exp.add("!in");
        exp.add(filed);
        for (String tag : values) {
            exp.add(tag);
        }
        Expression expression = Expression.fromRaw(exp.toJSONString());
        return expression;
    }

    public static void getImageExp() {

    }
}
